#include <iostream>
#include <string>
#include <map>
#include <memory>
#include "../lib/calc/calc.h"
#include "./invoke/invoke.h"

int main() {
    std::map<int, std::string> m = {
        {1, "good"},
        {2, "call"}
    };

    auto y = std::map<std::string, std::string>({
            {"a", "1"},
            {"b", "x"}
        });
    
    std::cout << "from map: " << &y["a"] << std::endl;

    auto x = std::make_shared<std::string>(std::move(m[2]));

    std::cout << "from map: " << &m[2] << std::endl; 
    std::cout << "from shared: " << x << std::endl;

    std::cout << "hello, from container" << std::endl;
    auto i = m[2];
    std::cout << i << std::endl;


    Calc calc1;
    std::cout <<  "value of calc1: " << calc1.getValue() << std::endl;
    
    auto calc2 = std::make_unique<Calc>(5);
    std::cout <<  "value of calc2: " << calc2->getValue() << std::endl;

    Calc * calc3 = &calc1;
    calc3->getValue();

    Calc c4(4);
    Calc & c5 = c4;
    std::cout <<  "value of c5: " << c5.getValue() << std::endl;

    Invoke t;
    std::cout << "content of t: " << t.getContent() << std::endl; 

    return 0;
}